package tests;

import common.Utils;
import org.openqa.selenium.Alert;

import java.io.IOException;

public class PageByLogin extends Utils {
    public static String listurl = "http://112.124.21.155:8080/blog_system/blog_list.html";

    public PageByLogin() {
        super("");
    }

    public void ListPageByNoLogin() throws IOException {
        driver.get(listurl);

        Alert alert = driver.switchTo().alert();
        alert.accept();
        String expect = driver.getTitle();
        getScreenShot(getClass().getName());
        assert expect.equals("登录页面");
    }
}
